home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / text / misc / pcal_4_5.lha / pcal / Kultur / pcal45_sasc651.patch < prev    next >
Text File  |  1994-11-10  |  3KB  |  143 lines

  1. --- pcal:pcalinit.c    Sun Oct 16 23:19:22 1994
  2. +++ pcalinit.c    Tue Oct 18 22:05:32 1994
  3. @@ -35,6 +35,7 @@
  4.   */
  5.  
  6.  #include <stdio.h>
  7. +#include <stdlib.h>
  8.  #include <ctype.h>
  9.  #include <string.h>
  10.  
  11. --- pcal:readfile.c    Sun Oct 16 23:19:20 1994
  12. +++ readfile.c    Tue Oct 18 21:57:14 1994
  13. @@ -161,7 +161,7 @@
  14.      int line = 0;
  15.  
  16.      int pptype, extra, ntokens, save_year, expr;
  17. -    int (*pfcn)();
  18. +    int (*pfcn)(char *);
  19.      char *ptok;
  20.      char **pword;
  21.      char msg[STRSIZ], incpath[STRSIZ];
  22. @@ -1321,7 +1321,7 @@
  23.      char **pword;        /* pointer to word after ordinal */
  24.  #endif
  25.  {
  26. -    int wkd, mon, mm, dd, len, (*pfcn)(), doit;
  27. +    int wkd, mon, mm, dd, len, (*pfcn)(int, int, int), doit;
  28.      int val_first, val_last, val_incr, mon_first, mon_last;
  29.      DATE *pdate, date;
  30.  
  31. @@ -1424,7 +1424,7 @@
  32.      char ***pptext;        /* return pointer to first word of text */
  33.  #endif
  34.  {
  35. -    int prep, n, rtn, base_wkd, incr, (*pfcn)();
  36. +    int prep, n, rtn, base_wkd, incr, (*pfcn)(int, int, int);
  37.      DATE *pd;
  38.  
  39.      /* we have the weekday - now look for the preposition */
  40. @@ -1543,7 +1543,10 @@
  41.          if ((cp = *++pword) == NULL)
  42.              return PARSE_INVLINE;
  43.  
  44. -        ADD_DATE(n, atoi(cp), curr_year);
  45. +        {
  46. +          int m = atoi(cp);
  47. +          ADD_DATE(n, m, curr_year);
  48. +        }
  49.          TERM_DATES;
  50.  
  51.          break;
  52. --- pcal:writefil.c    Sun Oct 16 23:19:52 1994
  53. +++ writefil.c    Tue Oct 18 22:09:32 1994
  54. @@ -233,7 +233,7 @@
  55.  #endif
  56.  {
  57.      int i, nfonts, nfsize, copies, dfltsize, color_dates;
  58. -    char *p, **ap, tmp[STRSIZ], alt_color, *allfonts[MAXFONT];
  59. +    char *p, **ap, tmp[STRSIZ], *allfonts[MAXFONT];
  60.      struct tm *p_tm;
  61.      time_t t;
  62.  #ifdef UN_X
  63. @@ -1124,7 +1124,7 @@
  64.      year_info *py;
  65.      month_info *pm;
  66.      unsigned long holidays;
  67. -    int i, j, len;
  68. +    int j, len;
  69.      short color[32];
  70.  
  71.      len = LENGTH_OF(month, year);
  72. @@ -1208,7 +1208,6 @@
  73.      register day_info *pd;
  74.      unsigned long holidays;
  75.      int has_holiday_text;
  76. -    static int first = TRUE;
  77.      static int save_year = 0;
  78.  
  79.      /* if no text for this year and month, return */
  80. @@ -1351,7 +1350,7 @@
  81.      int month, year;
  82.  #endif
  83.  {
  84. -    static int nmonths = 0, page = 0;
  85. +    static int nmonths = 0;
  86.      int startbox;
  87.  
  88.      /* start of new physical page? */
  89. --- pcal:exprpars.c    Sun Oct 16 23:19:38 1994
  90. +++ exprpars.c    Tue Oct 18 21:34:10 1994
  91. @@ -171,7 +171,7 @@
  92.      OPERAND *ptop;
  93.  #endif
  94.  {
  95. -    return ptop[0] && ptop[-1];
  96. +    return (OPERAND) (ptop[0] && ptop[-1]);
  97.  }
  98.  
  99.  
  100. @@ -183,7 +183,7 @@
  101.      OPERAND *ptop;
  102.  #endif
  103.  {
  104. -    return ptop[0] || ptop[-1];
  105. +    return (OPERAND) (ptop[0] || ptop[-1]);
  106.  }
  107.  
  108.  
  109. @@ -195,7 +195,8 @@
  110.      OPERAND *ptop;
  111.  #endif
  112.  {
  113. -    return (ptop[0] ^ ptop[-1]) != 0;
  114. +/*    return (ptop[0] ^ ptop[-1]) != 0;*/
  115. +    return (OPERAND) (ptop[0] ^ ptop[-1]);
  116.  }
  117.  
  118.  
  119. @@ -207,7 +208,7 @@
  120.      OPERAND *ptop;
  121.  #endif
  122.  {
  123. -    return ! ptop[0];
  124. +    return (OPERAND) ! ptop[0];
  125.  }
  126.  
  127.  
  128. --- pcal:moonphas.c    Sun Oct 16 23:19:32 1994
  129. +++ moonphas.c    Tue Oct 18 21:44:30 1994
  130. @@ -67,6 +67,12 @@
  131.  #include <ctype.h>
  132.  #include <math.h>
  133.  
  134. +#ifdef __SASC_60
  135. +#ifdef abs
  136. +#undef abs
  137. +#endif
  138. +#endif
  139. +
  140.  /*
  141.   * Pcal-specific definitions:
  142.   */
  143.